<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>Untitled Document</title>
		<script language="JavaScript" type="text/javascript" src="/lib/test/jsunit/app/jsUnitCore.js"></script>
		<script language="JavaScript" type="text/javascript" src="/lib/test/selenium/lib/prototype.js"></script>
		<script language="JavaScript" type="text/javascript" src="utils/mock-selenium-logger.js"></script>
        <script language="JavaScript" type="text/javascript" src="/lib/test/selenium/lib/scriptaculous/scriptaculous.js"></script>
        <script language="JavaScript" type="text/javascript" src="/lib/test/selenium/lib/cssQuery/cssQuery-p.js"></script>
        <script language="JavaScript" type="text/javascript" src="/lib/test/selenium/scripts/selenium-browserdetect.js"></script>
		<script language="JavaScript" type="text/javascript" src="/lib/test/selenium/scripts/selenium-browserbot.js"></script>
		<script language="JavaScript" type="text/javascript" src="/lib/test/selenium/scripts/htmlutils.js"></script>
		<script language="JavaScript" type="text/javascript" src="/user-extensions.js"></script>
		<script language="JavaScript" type="text/javascript">

			function exposeTestFunctionNames()
			{
				return [
					'testDefinedBackgroundColor',
					'testUnDefinedBackgroundColor',
					'testDefinedBackgroundColorLongHex'
				];
			}
			
			function testDefinedBackgroundColor()
			{
				
				var color = monkeypuzzler.getColorStyleValue($('TestDefined'), 'backgroundColor');
				assertNotNull("color should not be null",color);
				assertEquals('red is not expected', 0, color[0]);
				assertEquals('green is not expected', 255, color[1]);
				assertEquals('blue is not expected', 0, color[2]);
			}
			function testDefinedBackgroundColorLongHex()
			{
				
				var color = monkeypuzzler.getColorStyleValue($('TestDefinedLongHex'), 'backgroundColor');
				assertNotNull("color should not be null",color);
				assertEquals('red is not expected', 0, color[0]);
				assertEquals('green is not expected', 255, color[1]);
				assertEquals('blue is not expected', 0, color[2]);
			}
			
			function testUnDefinedBackgroundColor()
			{
				var color = monkeypuzzler.getColorStyleValue($('TestUnDefined'), 'backgroundColor');
				assertNull('Color should be null',color);
			}
			
			
		</script>
		<style type="text/css">
			#TestDefined {
				background-color: #0f0;
			}
			#TestDefinedLongHex {
				background-color: #00ff00;
			}
		</style>
	</head>
	<body>
			<div id="TestDefined">
				lorem ipsum
			</div>
			<div id="TestUnDefined">
				lorem ipsum
			</div>
			<div id="TestDefinedLongHex">
				lorem ipsum
			</div>
	</body>
</html>
